<?php
return [
    'adminEmail' => 'admin@example.com',



    //API分类
    'apiCategories' => [
        ['id' => 1, 'name' => '获取令牌',],
    ],

    //API
    'apis' => [
        [
            'cid' => 1,
            'name' => '获取令牌',
            'host' => 'oauth',
            'uri' => '/oauth2/token.html',
            'method' => 'POST',
            'isAuth' => false,
            'params' => [
                ["name"=>"grant_type", "necessary"=>true, "type"=>"enum", "options"=>[
                    ["name"=>"客户端模式", "value"=>"client_credentials"],
                    ["name"=>"授权码模式", "value"=>"authorization_code"],
                    ["name"=>"密码模式", "value"=>"password"],
                ], "default"=>"client_credentials", "intro"=>""],
                ["name"=>"client_id", "necessary"=>true, "type"=>"string", "default"=>"testclient", "intro"=>""],
                ["name"=>"client_secret", "necessary"=>true, "type"=>"string", "default"=>"testpass", "intro"=>""],
                ["name"=>"code", "necessary"=>false, "type"=>"string", "default"=>"", "intro"=>""],
                ["name"=>"username", "necessary"=>false, "type"=>"string", "default"=>"", "intro"=>"用户名"],
                ["name"=>"password", "necessary"=>false, "type"=>"string", "default"=>"", "intro"=>"密码"],
            ]
        ],
        [
            'cid' => 1,
            'name' => '获取授权码',
            'link' => 'http://oauth2server:7216/oauth2/authorize.html?response_type=code&client_id=testclient&state=xyz',
            'host' => 'oauth',
            'uri' => '/oauth2/authorize.html',
            'method' => 'POST',
            'isAuth' => false,
            'params' => []
        ],

    ],
];
